<template>
	<view>
		<evaluate :listData="listData" @replay="replay" :area="area"/>
		<uni-popup ref="virt" type="bottom" background-color="#fff">
			<Virtualman @refulesh="refulesh" />
		</uni-popup>
	</view>
</template>

<script>
	import {
		mapGetters
	} from "vuex";
	import { getuserweninfo, edituserwenpingadd } from '@/api/order'
    import evaluate from './xiujun-evaluate/uni-evaluate.vue'
	import Virtualman from './Virtualman/publish.vue'

	export default {
		computed: mapGetters(['uid']),
		components: {
			evaluate,
			Virtualman
		},
		data() {
			return {
				listData: {},
				problems: [],
				area: []
			};
		},
		onLoad(opt) {
			if (opt.id) {
				this.detail_id = opt.id
				this.getweninfo()
			}
			
		},
		methods: {
			replay() {
				this.$refs.virt.open()
			},
			refulesh({area , image}) {
				edituserwenpingadd({area, image, wen_id: this.detail_id}).then(res => {
					this.$refs.virt.close()
					this.getweninfo()
				})
			},
			getweninfo() {
				getuserweninfo({id: this.detail_id}).then( res => {
					this.listData = res.data.info
					this.area = res.data.area
				})
			},
            
        }
	}
</script>

<style scoped lang="scss">
</style>
